{block content}
<div id="block_bg_small">

	<div id="block_left_small">
		<h1 class="block">Projekty</h1>
		{block #projects}
		{default $parent = null}
		{default $level = 0}
		{var $l_projects = clone $projects}
			{foreach $l_projects->where('project_id',$parent) as $project}
			{if $level == 0}<div class="block"><table class="project_tree"><tr><th>Název</th><th width="100">Deadline</th><th width="100"></th></tr>{/if}
				<tr class="project {if $level > 0}subproject{/if}">
					<td class="project_name" style="padding-left:{$level*20+20}px"><a href="{link overview, $project[id]}">{$project[name]}</a></td>
					<td>{$project[deadline]|date:$dateFormatLong}</td>
					<td>
						<a n:href="Project:overview, $project[id]"><img src="{$basePath}/images/task.gif"></a>
						<a n:href="Project:milestones, $project[id]"><img src="{$basePath}/images/milestone.png"></a>
						<a n:href="Project:documents, $project[id]"><img src="{$basePath}/images/document.gif"></a>
						<a n:href="Project:flowChart, $project[id]"><img src="{$basePath}/images/diagram.gif"></a>
						<a n:href="Project:calendar, $project[id]"><img src="{$basePath}/images/calendar16.gif"></a>
					</td>
				</tr>
			{include #this, 'parent' => $project[id], 'level'=>$level+1}
			{if $level == 0}</table></div>{/if}
			{/foreach}
		{/block}
	</div>
	<div id="block_right_small" class="block">
		{if $user->isAllowed('project','add')}
		<div class="actions"><a href="{link addProject}">Nový projekt</a></div>
		{/if}
		<p>
			Vítejte v přehledu projektů. Klepnutím na jednotlivé ikony se
			dostanete stránku s příslušnými informacemi o projektu.
		</p>
		<p>
			<img src="/images/task.gif"> – Úkoly<br>
			<img src="/images/milestone.png"> – Milníky<br>
			<img src="/images/document.gif"> – Dokumenty<br>
			<img src="/images/diagram.gif"> – Síťový diagram<br>
			<img src="/images/calendar16.gif"> – Kalendář
		</p>
	</div>
	<div class="clear"></div>
</div>
{/block}
{block head}
<link rel="stylesheet" href="{$basePath}/css/{$colorstyle}/project.css">
{/block}